package com.yhm.myfootbollshow.demos.controller;

import com.yhm.myfootbollshow.demos.base.ResVo;
import com.yhm.myfootbollshow.demos.entity.vo.CategoryVo;
import com.yhm.myfootbollshow.demos.service.CategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: yhm
 * @time: 2025/4/4 17:15
 */
@RestController
@RequestMapping("yhm/category")
public class CategoryController {
    @Resource
    private CategoryService categoryService;

    @GetMapping("list")
    public ResVo<List<CategoryVo>> getCategory() {
        return ResVo.ok(categoryService.listCategory());
    }
}
